<?php
	/**
	 * .ini-File parse.
	 * @author IMP
	 */ 
		
	class IniParser extends IniTransformer implements Resource {
		public function __construct($f = array()){
			if($f instanceof File){
				parent::__construct(parse_ini_file($f->getAbsolutePath(), true));
			}elseif(is_array($f)){
				parent::__construct($f);
			}else{
				throw new ParameterException('$f', array('File', 'Array'), $f);
			}
		}
		
		public static function open(File $f){
			return new self($f);
		}
				
		public static function formFilename($name){
			return $name . '.ini';
		}
	}
?>